﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.OleDb;
using System.Configuration;
/// <summary>
///Access 的摘要说明
/// </summary>
public class Access:DBBase
{
    protected override System.Data.Common.DbConnection initConnection()
    {
        return new OleDbConnection();
    }

    protected override System.Data.Common.DbCommand initCommand()
    {
        return new OleDbCommand();
    }

    protected override System.Data.Common.DbDataAdapter initDataAdapter()
    {
        return new OleDbDataAdapter();
    }

    protected override string initConnectionString()
    {
        return ConfigurationManager.ConnectionStrings[ConfigGlobal.GetGlobal().ConnectionStringName].ToString();
    }

    public Access()
        : base()
    { }

    public Access(string connstr)
        : this()
    {
        this.ConnectionString = connstr;
        this.conn.ConnectionString = ConnectionString;
    }

    protected override string initProviderName()
    {
        return ConfigurationManager.ConnectionStrings[ConfigGlobal.GetGlobal().ConnectionStringName].ProviderName;
    }

    protected override System.Data.Common.DbParameter createParamter()
    {
        return new OleDbParameter();
    }
}
